package com.linghang.lhonline.Util;

import com.linghang.lhonline.dataobject.Homework;

import java.util.Comparator;

public class HomeworkSortUtil implements Comparator {

    @Override
    public int compare(Object o1, Object o2) {

        Homework homework1 = (Homework) o1;
        Homework homework2 = (Homework) o2;

        return homework1.getPostTime().compareTo(homework2.getPostTime());
    }
}
